package com.movie.ticket.sale.feignClients;

import com.movie.ticket.sale.moviecommon.common.Result;
import com.movie.ticket.sale.pram.DiscountPram;
import com.movie.ticket.sale.pram.MoviePram;
import com.movie.ticket.sale.pram.PersonPram;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


/**
 * @BelongsProject: movie-boss
 * @BelongsPackage: com.movie.ticket.sale
 * @Author: lyl
 * @CreateTime: 2020-12-11 11:22
 * @Description:
 */
@FeignClient("movie-boss")
public interface bossFeigns {
    @GetMapping("getCinemas")
    public Result getCinemas(@RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getOrders")
    public Result getOrders(@RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getUsers")
    public Result getUser(@RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("isVip")
    public Result isVip();

    @PutMapping("isCinema")         //修改 -- ym
    public Result isCinema(@RequestParam("cinemaId") int cinemaId);

    @PostMapping("getAllApplyForEnter")     //添加  --  ym
    Result getAllApplyForEnter();

    @PostMapping("configApply")             //添加  --  ym
    Result configApply(@RequestParam("id") int id);

    @PutMapping("noCinema")
    public Result noCinema(@RequestParam("cinemaId") int cinemaId, @RequestParam("massage") String massage);

    @PutMapping("deleteCinema")
    public Result deleteCinema(@RequestParam("cinemaId") int cinemaId, @RequestParam("massage") String massage);

    @GetMapping("getContracts")
    public Result getContracts(@RequestParam("cinemaId") int cinemaId, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getIsCinemas")
    public Result getIsCinemas(@RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getUserVip")
    public Result getUserVip(@RequestParam("userId") int userId, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getDiscounts")
    public Result getDiscounts(@RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getPoints")
    public Result getPoints(@RequestParam("userId") int userId);

    @GetMapping("getUserDiscounts")
    public Result getUserDiscounts(@RequestParam("userId") int userId, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getAllCinema")
    public Result getOCinema(@RequestParam("cinemaId") int cinemaId);

    @GetMapping("getComplaints")
    public Result getComplaints(@RequestParam("cinemaId") int cinemaId, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getUserOrder")
    public Result getUserOrder(@RequestParam("userId") int userId, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @GetMapping("getCinemaOrder")
    public Result getCinemaOrder(@RequestParam("cinemaId") int cinemaId, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @PostMapping("addDiscount")
    public Result addDiscount(@RequestBody DiscountPram discount);

    @PutMapping("changeDiscount")
    public Result changeDiscount(@RequestBody DiscountPram discount);

    @DeleteMapping("deleteDiscount")
    public Result deleteDiscount(@RequestParam("discountId") int discountId);

    @PostMapping("addMovie")
    public Result addMovie(@RequestBody MoviePram movie);

    @PostMapping("addMovieData")
    public Result addMovieData(@Param("name") String name, @Param("type") String type, @Param("introduce") String introduce, @Param("time") Integer time, @Param("boxOffice") Double boxOffice, @Param("movieGrade") Double movieGrade, @Param("state") Integer state, @Param("releaseDate") String releaseDate, @Param("filePaths") MultipartFile[] filePaths, @Param("types") int types);

    @PostMapping("addPerson")
    public Result addPerson(@RequestParam("name") String name, @RequestParam("introduce") String introduce, @RequestParam("sex") String sex, @RequestParam("age") Integer age, @RequestParam("country") String country, @RequestParam("nation") String nation, @RequestParam("college") String college, @RequestParam("company") String company);

    @PostMapping("addPersonData")
    public Result addPersonData(@RequestParam("personId") int personId, @RequestParam("path") MultipartFile path);

    @PostMapping("addMoviePerson")
    public Result addMoviePerson(@RequestParam("movieId") int movieId, @RequestParam("personId") int personId, @RequestParam("type") int type);

    @PutMapping("changeMovie")
    public Result changeMovie(@RequestBody MoviePram movie);

    @DeleteMapping("deleteMovie")
    public Result deleteMovie(@RequestParam("movieId") int movieId);

    @GetMapping("getBossAcount")
    public Result getBoosAcount(@RequestParam("time") String time);

    @GetMapping("getPersons")
    public Result getPerson(@RequestParam("name") String name, @RequestParam(defaultValue = "1") int currPage, @RequestParam(defaultValue = "5") int number);

    @PostMapping("addMovieDatas")
    public Result addMovieDatas(@RequestParam("movieId") Integer movieId, @RequestParam("type") int type, @Param("filePaths") MultipartFile[] filePaths);
}
